<form class="form-horizontal" id="form-add-news">
    <div class="form-group">
        <label class="control-label col-xs-2">
            产品名称
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="text" value="{$info.title}" required class="form-control" name="title" autocomplete="off" placeholder="请输入产品名称">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">图片<span style="color: #FF0000;">*</span></label>
        <div class="col-xs-9">
            {include file="public/singleImageUploader" uploader-name="img_url" /}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">产品简介<span style="color: #FF0000;">*</span></label>
        <div class="col-xs-9">
            {include file="public/ueditor" editor-name="desc" /}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            产品价值
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="number" value="{$info.price1}" step="1" required class="form-control" name="price1" autocomplete="off" style="width: 100px!important; display:inline-block;">
            -
            <input type="number" value="{$info.price2}" step="1" required class="form-control" name="price2" autocomplete="off" style="width: 100px!important; display:inline-block;">
            <i>仅限正整数</i>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            抢购时间
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="time" value="{:transdate($info.time_start)}" required class="form-control" name="time_start" autocomplete="off" style="width: 120px!important; display:inline-block;">
            -
            <input type="time" value="{:transdate($info.time_end)}" required class="form-control" name="time_end" autocomplete="off" style="width: 120px!important; display:inline-block;">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            购买扣除共享豆
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="number" value="{$info.point_start}" step="1" required class="form-control" name="point_start" autocomplete="off" style="width: 100px!important; display:inline-block;">
<!--            - -->
            <input type="number" value="{$info.point_end}" step="1" required class="form-control" name="point_end" autocomplete="off" style="width: 100px!important; display:none;">
            <i>仅限正整数</i>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            合约收益
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="number" value="{$info.daynum}" step="1" required class="form-control" name="daynum" autocomplete="off" style="width: 100px!important; display:inline-block;">
            天
            <input type="number" value="{$info.daypercent}" step="1" required class="form-control" name="daypercent" autocomplete="off" style="width: 100px!important; display:inline-block;">
            %
            <i>仅限正整数</i>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-2">
            每日可得scb数量:
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="text" value="{$info.botnum}" required class="form-control" name="botnum" autocomplete="off" style="width: 100px!important; display:inline-block;">
            <i>仅限正整数</i>
        </div>
    </div>



    <div class="form-group hide ">
        <label class="control-label col-xs-2">
            可挖ATC
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="number" value="{$info.atcnum}" step="1" required class="form-control" name="atcnum" autocomplete="off" style="width: 100px!important; display:inline-block;">
            个
            <i>仅限正整数</i>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            前台显示
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <label class="checkbox-inline"> <input type="radio" name="isshow" value="1" {if $info.isshow eq 1}checked{/if}> 显示</label>
            <label class="checkbox-inline"> <input type="radio" name="isshow" value="2" {if $info.isshow eq 2}checked{/if}> 隐藏</label>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            关闭购买
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <label class="checkbox-inline"> <input type="radio" name="isclose" value="1" {if $info.isclose eq 1}checked{/if}> 正常购买</label>
            <label class="checkbox-inline"> <input type="radio" name="isclose" value="2" {if $info.isclose eq 2}checked{/if}> 关闭购买</label>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            关闭购买提示
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="text" value="{$info.closestr}" class="form-control" name="closestr" autocomplete="off" placeholder="请输入关闭购买提示">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            排序号
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="number" value="{$info.sort}" step="1" required class="form-control" name="sort" autocomplete="off">
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-offset-2 col-xs-3">
            <button type="submit" class="btn btn-success btn-block">确认添加</button>
        </div>
    </div>
</form>

<script src="__PUBLIC__/vendors/jquery.validation/jquery.validate.min.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/additional-methods.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/messages_zh.min.js"></script>
<script src="__PUBLIC__/vendors/select2/js/select2.min.js"></script>
<script type="application/javascript">
    $(function () {
        $("form").validate({
            debug: false,
            submitHandler: function () {
                ajaxSubmit('form-add-news', true);
            }
        });
    })
</script>
